﻿@{
    ViewBag.Title = "资源限制";
    Layout = "~/Views/Shared/_ListLayout.cshtml";
}
@inherits CMSWebViewPage<object>
<div id="toolbar_uploadcategory" class="datagrid-toolbar">
    @CurrentButtonTool.Create()
    <div>
        <form id="fr_search_uploadcategory">
            @Html.QueryStringBox("名称", "Name")
            @Html.QueryStringBox("资源类型", "CategoryCode")
            <a href="javascript:void(0)" onclick="Search();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">Search</a>
        </form>
    </div>
</div>
<table id="dg_uploadcategory" data-options="url:'/uploadcategory/listjson/',border:false,fit:true,fitColumns:true,toolbar:'#toolbar_uploadcategory',singleSelect:true,pagination:true,pageSize:20">
    <thead>
        <tr>
            <th data-options="field:'ck',checkbox:true"></th>
            <th data-options="field:'Id',width:40,align:'center'">Id</th>
            <th data-options="field:'Name',width:80,align:'center'">名称</th>
            <th data-options="field:'CategoryCode',width:80,align:'center'">资源类型</th>
        </tr>
    </thead>
</table>
@section Bottom{
    <script type="text/javascript">
        var objBizDatagrid = new BizDatagrid('#dg_uploadcategory');
        function Add() {
            objBizDatagrid.add("/uploadcategory/editpage");
        }
        function Edit() {
            objBizDatagrid.edit("/uploadcategory/editpage");
        }
        function Search() {
            objBizDatagrid.search('#fr_search_uploadcategory', '/uploadcategory/listjson');
        }
        function Delete() {
            objBizDatagrid.del('/uploadcategory/delete');
        }
        function UploadLimit() {
            var objRow = objBizDatagrid.selectRow();
            window.location = "/uploadlimit?TransferID=" + objRow.Id;
        }
    </script>
}

